<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/master">

<body layout:fragment="content">
<link rel="stylesheet" type="text/css" href="/css/mui.min.css">
<div th:replace="layout/layout::center_zy_search_top_box('我的账单')"></div>
<!-- 内容框 -->
<div class="zy_module-content">
    <div class="vip_ershou_manage vip_user_shouc">

        <div id="leftTabBox" class="ersh_tab">
            <div class="hd">
                <ul class="fix">
                    <li class="on"><a href="user_shouc.html">我的账单</a></li>
                </ul>
            </div>
            <div class="mui-content flow_goods">
                <ul class="mui-table-view">
                    <h2>金额 <span style="float: right">余额</span></h2>
                    <li th:each="item:${data}" class="mui-table-view-cell">
                        <div class="mui-slider-handle">
                            <div class="default">
                                <div>
                                    <h2>[[${item.income}]] <span style="float: right">[[${item.surplus}]]</span></h2>
                                    <p>备注:[[${item.remark}]]</p>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
                <div class="zy_fanye" th:utext="${page}">
                </div>
            </div>

            <script src="/js/mui.min.js"></script>
            <script>
                mui.init();
                (function ($) {
                    $('.mui-table-view').on('tap', '.mui-btn', function (event) {
                        var elem = this;
                        var li = elem.parentNode.parentNode;
                        li.parentNode.removeChild(li);
                    });
                })(mui);
                // .goods里面的a标签的默认链接事件被引用的js阻止了用这个来代替链接
                $(function () {
                    $(".mui-table-view-cell .goods dl").mousedown(function () {
                        window.location.href = "goods.html";
                    });
                });

                function del(id) {
                    if (!layer.confirm("确认删除收藏商品？")) {
                        return;
                    }
                    $.post("/ajax/product/delFavorite", {id: id}, function (d) {
                        if (d.code == 0) {
                            layer.msg("删除成功");
                        }
                    })
                }
            </script>

        </div>
    </div>

</div>

</body>

</html>